package org.footballmanager.pandafootball;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
@EnableScheduling
@ComponentScan
@ServletComponentScan
@MapperScan("org.footballmanager.pandafootball.system.mapper")
public class PandafootballApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(PandafootballApplication.class, args);
    }

    /**
     * 配置
     *
     * @param application 参数
     * @return 返回值
     */
    @Override
    protected SpringApplicationBuilder configure(
            SpringApplicationBuilder application) {
        return application.sources(PandafootballApplication.class);
    }
}
